import type { PropType } from 'vue';
import type { InOptions } from './types';
import type { ISelectProps, ButtonProps } from 'element-plus';

export const basicProps = {
  request: {
    type: Function as PropType<(...arg: any[]) => Promise<any>>,
    default: () => {},
  },
  options: {
    type: Array as PropType<Array<InOptions>>,
    default: () => [],
  },
  buttonText: {
    type: String,
    default: '查询',
  },
  buttonProps: {
    type: Object as PropType<ButtonProps>,
    default: () => ({
      type: 'primary',
    }),
  },
  inputProps: {
    type: Object,
    default: () => ({
      clearable: true,
    }),
  },
  selectProps: {
    type: Object as PropType<ISelectProps>,
    default: () => ({
      clearable: true,
    }),
  },
  isReset: {
    type: Boolean,
    default: false,
  },
  isButton: {
    type: Boolean,
    default: true,
  },
};
